西维蜀黍

🐒 Software engineer | 📷Photographer | 👹Urban explorer

  • 主页
  • 所有文章
Tag Friends

西维蜀黍

🐒 Software engineer | 📷Photographer | 👹Urban explorer

  • 主页
  • 所有文章

【Algorithm】字符串匹配算法 - KMP 算法

2019-05-22

模式匹配 / 字符串匹配算法

字符串匹配

字符串匹配问题的形式定义:

  • 文本(Text)是一个长度为 n 的数组 T [1..n],在下文中,将其对应的字符串称之为” 源字符串 “;
  • 模式(Pattern)是一个长度为 m 且 m≤n 的数组 P [1..m],在下文中,将其对应的字符串称之为” 模式字符串 “;
  • T 和 P 中的元素都属于有限的字母表 Σ 表;
  • 如果 0≤s≤n-m,并且 T [s+1..s+m] = P [1..m],即对 1≤j≤m,有 T [s+j] = P [j],则说模式 P 在文本 T 中出现且位移为 s,且称 s 是一个有效位移(Valid Shift)。

img

比如上图中,目标是找出所有在文本 T = abcabaabcabac 中模式 P = abaa 的所有出现。该模式在此文本中仅出现一次,即在位移 s = 3 处,位移 s = 3 是有效位移。

常见的字符串匹配算法

解决字符串匹配的算法包括:朴素算法(Naive Algorithm)、Rabin-Karp 算法、有限自动机算法(Finite Automation)、 Knuth-Morris-Pratt 算法(即 KMP Algorithm)、Boyer-Moore 算法、Simon 算法、Colussi 算法、Galil-Giancarlo 算法、Apostolico-Crochemore 算法、Horspool 算法和 Sunday 算法等。

字符串匹配算法的步骤

字符串匹配算法通常分为两个步骤:预处理(Preprocessing)和匹配(Matching)。所以算法的总运行时间为预处理和匹配的时间的总和。

img

上图描述了常见字符串匹配算法的预处理和匹配时间。

Knuth-Morris-Pratt 字符串匹配算法(即 KMP 算法)

前缀和后缀

在正式介绍 KMP 算法之前,我们先解释一下字符串的前缀和后缀的概念。

字符串的前缀(prefix)

如果字符串 A 和 B,存在 A=BS,其中 S 是任意的非空字符串,那就称 B 为 A 的前缀。例如,”Harry” 的前缀包括”H”, ”Ha”, ”Har” 和 ”Harr”。

要注意的是,字符串本身并不是自己的前缀(因为在 A=BS 中的 S,必须是非空字符串)。

字符串的前缀集合

我们把所有前缀组成的集合,称为字符串的前缀集合。例如,”Harry” 的前缀集合为 {”H”, ”Ha”, ”Har”, ”Harr”}。

字符串的后缀(postfix)

同样,可以定义后缀 A=SB, 其中 S 是任意的非空字符串,那就称 B 为 A 的后缀。例如,”Potter” 的后缀包括”otter”, ”tter”, ”ter”, ”er”, ”r”。

同样地,要注意的是,字符串本身并不是自己的后缀。

字符串的后缀集合

我们把所有后缀组成的集合,称为字符串的后缀集合。例如,”Potter” 的后缀集合为 {”otter”, ”tter”, ”ter”, ”er”, ”r”}。

注意,字符串的前缀和后缀同样是一个字符串,而前缀集合和后缀集合分别都是一个包含零个到多个字符串的集合。

部分匹配表(Partial Match Table)

对于任何一个非空字符串,我们都可以为之计算出一个对应的部分匹配表(Partial Match Table)。

我们下面来详细讨论一下,如何为一个字符串生成其对应的部分匹配表(Partial Match Table)。至于为什么要生成部分匹配表,我们稍后再解释。

以字符串 “abababca” 为例:

  • char 行表示将字符串的各个字符从左向右依次排列的结果;
  • index 行的值表示各字符在字符串的索引位置,比如,第一次出现的字符 c 在字符串 “abababca” 中的索引为 6。

image-20190522115853909

上面的描述很容易理解,我们重点来看看 pmt 行的含义。

首先需要明确的是,pmt 的值,是对于一个字符串而言的(而不是对于一个字符),即字符串的前缀集合与后缀集合的交集中 最长元素的长度值。

例如,对于字符串”aba”,它的前缀集合为 {”a”, ”ab”},后缀集合为 {”ba”, ”a”}。两个集合的交集为 {”a”},那么其中长度最长的元素就是字符串”a” 了,其长度为 1。所以对于”aba” 而言,它在 pmt 表中对应的值就是 1。

再比如,对于字符串”ababa”,它的前缀集合为 {”a”, ”ab”, ”aba”, ”abab”},它的后缀集合为 {”baba”, ”aba”, ”ba”, ”a”}, 两个集合的交集为 {”a”, ”aba”},其中最长的元素为”aba”,长度为 3。

回到上面的部分匹配表,我们依次计算字符串 a、ab、aba、abab、ababa、ababab、abababc 和 abababca 的 pmt 值,分别为 0、0、1、2、3、4、0 和 1。在部分匹配表中,我们将这些字符串的 pmt 值标记为该字符串中最后一个字符的 pmt 值。比如字符串 abababc 的 pmt 值为 0,该字符串中的最后一个字符为 c,所以将 0 标记成这个字符 c 的 pmt 值。而事实上,在这个表中,字符 c 的 pmt 值为 0 表示的是字符串 abababc 的 pmt 值 为 0 (pmt 的值,只对一个特定的字符串才有意义)。

img

next 的值等于当前字符的左边字符的 pmt 值。比如字符 c 左边的字符是 b,这个字符 b 的 pmt 值为 4,所以字符 c 的 next 值为 4。

因为一个字符串的第一个字符的前面不可能有其他字符,所以就不会存在所谓的前后缀相同元素,因此 pmt [0] 恒等于 0。自然地,next [1] 恒等于 0。

我们还规定 next [0] 恒等于 - 1。

演化

KMP 算法本质上是基于朴素的字符串匹配算法(Naive String Matching Algorithm)进行改进的。

因此,我们接下来在回顾朴素的字符串匹配算法之后,指出其不足,并在其基础进行演化。

在朴素的字符串匹配算法(Naive String Matching Algorithm)中,我们首先将串 A (源字符串)与串 B (模式字符串)的首字符对齐,然后逐个判断相对的字符是否相等,如下图所示:

img

因为字符 A 与 B 不匹配,所以模式字符串 “ABCDABD” 右移一个字符,右移后如下所示:

img

接下来,模式字符串不断右移,直到模式字符串的第一个字符与源字符串中的当前扫描字符相同(情况如下所示):

img

接着比较模式字符串和源字符串的下一个字符,还是相同(情况如下所示):

img

直到模式字符串中的当前扫描字符,与源字符串中的当前扫描字符不相同为止(下图描述了不相同的情况):

img

这时,基于最朴素的字符串匹配思想,我们会继续将模式字符串向右移动一个字符,并将指向模式字符串中字符的指针重置以指向模式字符串的首字符(如下所示)。这样做虽然可行,但是效率很差。

img

实际上,每当匹配失败时,可以得出两个结论:

  • 本趟匹配失败;
  • 在模式字符串中,模式字符串当前匹配失败的字符之前的字符串在源字符串中是能够完全匹配成功的,而且在源字符串和模式字符串中的这些匹配字符的位置在这时刚好是一一对应的。

最传统的 BF 算法正是没有利用第二条结论锁对应的信息,所以效率低。

而 KMP 算法充分利用了第二条结论的信息,从而尽可能地让模式字符串向右远移。KMP 算法的核心思想是尽可能地让模式字符串向右远移,每次匹配失败后模式字符串向右移动越远,比较的次数就会越少,算法的性能自然就提高了。


怎么才能做到这一点呢?这就是理解 KMP 算法的关键了。

可以针对模式字符串中的每个字符,算出一张部分匹配表(Partial Match Table)。前面,我们已经介绍了如何计算一个字符串对应的部分匹配表。

类似地,我们可以得到字符串 “ABCDABD” 的部分匹配表:

char A B C D A B D
index 0 1 2 3 4 5 6
pmt 0 0 0 0 1 2 0

回到这个状态:

img

已知空格与字符 “D” 不匹配时,前面六个字符”ABCDAB” 是匹配的。查表可知,最后一个匹配字符 B 对应的部分匹配值(pmt 值)为 2,这意味着字符失配前的字符串(即字符串 ABCDAB )的 pmt 值是 2 。

我们知道,pmt 的值,表示的是字符串的前缀集合与后缀集合的交集中 最长元素的长度值。

对于字符串 ABCDABD,其前缀集合与后缀集合的交集中的最长的元素是字符串 AB,这自然也意味着:字符串 ABCDABD 一定以字符串 AB 开头,也一定以字符串 AB 结尾(如下图所示)。注意,这个字符串 ABCDABD 既在源字符串中存在,也在模式字符串中存在。

![bg2013050107 copy](assets/bg2013050107 copy-8585829.jpg)

再回顾一次,KMP 算法的核心思想是尽可能地让模式字符串向右远移。因此,我们可以将模式字符串右移 4 个字符(因为在模式字符串中,第一次出现的”AB” 和第二次出现的”AB” 相差 4 个字符),以使得模式字符串起始部分的”AB” 能与源字符串第二次出现的”AB” 匹配。你可能会说:这样右移后,即使”AB“相互匹配了,那空格与”C” 也不匹配啊?对的,虽然是这样,但是避免了像在最传统的 BF 算法中,每次只将模式字符串向右一个字符后,就至少做一次比较的情况(这里,KMP 是算法右移了 4 个字符,因此比 BF 算法在这个过程中,稍进行了三次字符比较)。

![bg2013050110 copy](assets/bg2013050110 copy-8598055.jpg)

上面的这个分析和右移 4 个字符的过程,就是基于所谓的” 利用当每次匹配失败后,得到的结论 2“,即” 在模式字符串中,当前匹配失败的字符之前的字符串在源字符串中是能够完全匹配成功的 “。


你可能又会想,为什么我们可以直接将模式字符串右移 4 个字符,会不会因此而有漏掉匹配的情况呢?比如假设刚才已经匹配的”ABCDAB” 是”ABABAB” 的情况,这时候,我们应该只将模式字符串右移 2 个字符。

image-20190523161900125

事实上,当模式字符串从”ABCDABD” 变成了”ABABABD” 后,其对应的部分匹配表也会发生改变:

image-20190523162600491

最后一个匹配字符 B 对应的部分匹配值(pmt 值)为 4,这意味着字符失配前的字符串(即字符串 ABABAB )的 pmt 值是 4 。因此,在这种情况下,我们只能把模式字符串右移 2 个字符(因为我们需要具体去判断下面这种场景是不是所有的字符串都匹配了)。

![:Working:Blog Draft:assets:image-20190523161900125 copy](assets/20190523161900125 copy.jpg)


我们发现:

1
移动位数 = 已匹配的字符数 - 模式字符串最后一个匹配字符的部分匹配值(pmt值)

仔细体会这一点,你就能明白为什么 KMP 算法要计算部分匹配表(Partial Match Table)了,而且 pmt 值的计算,是通过计算字符串的前缀集合与后缀集合的交集中 最长元素的长度值来完成。


我们继续回到模式字符串为”ABCDABD” 的场景。

因为 6 - 2 等于 4,所以将模式字符串向右移动 4 个字符(移动后如下所示):

img

因为空格与C不匹配,搜索词还要继续往后移。这时,已匹配的字符数为 2(”AB”),对应的” 部分匹配值” 为 0。所以,移动位数 = 2 - 0,结果为 2,于是将模式字符串向右移动 2 个字符。

img

因为空格与 A 不匹配,继续将模式字符串向右移动 1 个字符。

img

逐位比较,直到发现 C 与 D 不匹配。于是,移动位数 = 6 - 2,继续将模式字符串向右移动 4 个字符。

img

逐位比较,直到模式字符串的最后一个字符,发现完全匹配,于是搜索完成。

next 数组的计算实现

我们来看一下如何编程快速求得 next 数组。其实,求 next 数组的过程完全可以看成字符串匹配的过程,即以模式字符串为源字符串,以模式字符串的前缀为目标字符串,一旦字符串匹配成功,那么当前字符的 next 值就是匹配成功的字符串的长度。

具体来说,从源字符串的索引第 1 位(而不是第 0 位)开始对自身进行匹配运算。 在任一位置,能匹配的最长长度就是当前扫描字符的 next 值。如下图所示。

注意,我们规定 next [0] 恒等于 -1,而 next [1] 一定等于 0。

image-20190523214835309

image-20190524101943640

image-20190524101953863

image-20190524102001792

image-20190524102009730

https://juejin.im/post/5b8f9aed6fb9a05d2e1b75d9

https://blog.csdn.net/v_july_v/article/details/7041827

http://www.cnblogs.com/gaochundong/p/boyer_moore_string_matching_algorithm.html

AA 与 AAAAAAAAB

char A A A A A A A A B
index 0 1 2 3 4 5 6 7 8
pmt 0 1 2 3 4 5 6 7 0

Java 实现

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

public class KMP {
public int indexOf(String source, String pattern) {
int i = 0, j = 0;
char[] src = source.toCharArray();
char[] ptn = pattern.toCharArray();
int sLen = src.length;
int pLen = ptn.length;
int[] next = getNext(ptn);
while (i < sLen && j < pLen) {
// 如果j = -1,或者当前字符匹配成功(src[i] = ptn[j]),都让i++,j++
if (j == -1 || src[i] == ptn[j]) {
i++;
j++;
} else {
// 如果j!=-1且当前字符匹配失败,则令i不变,j=next[j],即让pattern模式串右移j-next[j]个单位
j = next[j];
}
}
if (j == pLen)
return i - j;
return -1;
}
public int[] getNext(char[] p) {
// 已知next[i] = j,利用递归的思想求出next[i+1]的值
// 如果已知next[i] = j,如何求出next[i+1]呢?具体算法如下:
// 1. 如果p[i] = p[j], 则next[i+1] = next[j] + 1;
// 2. 如果p[i] != p[j], 则令j=next[j],如果此时p[i]==p[j],则next[i+1]=j+1,
// 如果不相等,则继续递归前缀索引,令 j=next[j],继续判断,直至j=-1(即j=next[0])或者p[i]=p[j]为止
int pLen = p.length;
int[] next = new int[pLen];
next[0] = -1; // next数组中next[0]为-1

int j = -1;
int i = 0;

while (i < pLen - 1) {
if (j == -1 || p[i] == p[j]) {
j++;
i++;
next[i] = j;
} else {
j = next[j];
}
}
return next;
}
}

public static void main(String[] args){
KMP kmp = new KMP();
String a = "QWERQWR";
String b = "WWE QWERQW QWERQWERQWRT";
int[] next = kmp.getNext(a.toCharArray());
for(int i = 0; i < next.length; i++){
System.out.println(a.charAt(i)+" "+next[i]);
}
int res = kmp.indexOf(b, a);
System.out.println(res);
}

总结

预处理过程(COMPUTE-PREFIX-FUNCTION)的运行时间为 Θ(m),KMP-MATCHER 的匹配时间为 Θ(n)。

相比较于朴素的字符串匹配算法(Naive String Matching Algorithm),KMP 算法的主要优化点就是在当确定字符不匹配时对于 pattern 的位移。


假设主串 S 的长度为 n,模式串 P 的长度为 m。

KMP 算法的主要特点是:

  1. 需要对模式字符串做预处理;
  2. 预处理阶段需要额外的 O (m) 空间和复杂度;
  3. 匹配阶段与字符集的大小无关;
  4. 匹配阶段至多执行 2n - 1 次字符比较;
  5. 对模式中字符的比较顺序时从左到右;

Reference

  • 数据结构 - 串 - https://zhuanlan.zhihu.com/p/29160321
  • 数据结构之串 - https://www.zybuluo.com/guoxs/note/237408
  • [数据结构] 线性结构 —— 串 - https://blog.csdn.net/shimazhuge/article/details/46808193
  • 字符串匹配算法 - https://www.cnblogs.com/gaochundong/p/string_matching.html
  • 字符串匹配的 KMP 算法 - http://www.ruanyifeng.com/blog/2013/05/Knuth–Morris–Pratt_algorithm.html
  • 字符串匹配算法 - https://www.cnblogs.com/gaochundong/p/string_matching.html
  • 算法之字符串模式匹配 - https://zhuanlan.zhihu.com/p/24649304
  • KMP 算法之 java 实现 - https://blog.csdn.net/roy_70/article/details/78330246
  • 如何更好的理解和掌握 KMP 算法?- https://www.zhihu.com/question/21923021
  • Algorithm
  • Algorithm

扫一扫,分享到微信

【Algorithm】字符串匹配算法 - 朴素的字符串匹配算法(Naive String Matching Algorithm)
【Data Structure】串(String)
© 2020 西维蜀黍
  • Tag
  • Friends

tag:

  • Algorithm Problem
  • AWS
  • Algorithm
  • Architectural Pattern
  • Architecture
  • ArchitectureDesign
  • Nginx
  • Frontend
  • Cache
  • Browser
  • C#
  • Debug
  • Visual Studio
  • Cache System
  • Compile
  • Data Structure
  • JavaScript
  • Data Format
  • Database
  • Design Pattern
  • Distributed System
  • Microservices
  • Django
  • Redis
  • Docker
  • ELK
  • Format
  • Git
  • Version Control
  • Golang
  • HTTP
  • Network
  • Hardware
  • Interview
  • JQuery
  • Java EE
  • Software Testing
  • Java
  • Network Programming
  • LaTeX
  • Linux
  • Operating System
  • Linxu
  • Lock
  • macOS
  • Markdown
  • Lucene
  • Mattermost
  • MySQL
  • Netwok
  • Netwrok
  • Node.js
  • nvm
  • NPM
  • npm
  • OOP
  • OpenWrt
  • Operating Systems
  • Performancede
  • Performance
  • Programming
  • Protobuf
  • Python
  • RaspbeeryPi
  • Codis
  • SQL
  • Regular Expression
  • Security
  • Spring
  • TypeScript
  • VMware
  • Vmware
  • Windows
  • WordPress
  • VPN
  • hexo
  • ZooKeeper
  • iOS
  • hugo

    缺失模块。
    1、在博客根目录(注意不是 yilia 根目录)执行以下命令:
    npm i hexo-generator-json-content --save

    2、在根目录_config.yml 里添加配置:

      jsonContent:
        meta: false
        pages: false
        posts:
          title: true
          date: true
          path: true
          text: true
          raw: false
          content: false
          slug: false
          updated: false
          comments: false
          link: false
          permalink: false
          excerpt: false
          categories: false
          tags: true
    

  • 【Microservices】Service Mesh(服务网格)

    2020-08-22

    #Microservices

  • 【Golang】性能分析 - 监控 Golang 程序的垃圾回收

    2020-08-22

    #Golang

  • 【Golang】性能分析 - PProf

    2020-08-15

    #Golang

  • 【Linux】命令 - date

    2020-08-09

    #Linux

  • 【Python】Python3 的时间

    2020-08-09

    #Python

  • 【Python】Log Framework - logging

    2020-08-09

    #Python

  • 【hugo】使用

    2020-08-09

    #hugo

  • 【Python】Django - Django Shell

    2020-08-09

    #Python

  • 【Python】安装 Python

    2020-08-06

    #Python

  • 【Python】升级 Python 版本

    2020-08-06

    #Python

  • 【Golang】关键字 - defer

    2020-08-02

    #Golang

  • 【Golang】初始化(Intialization)

    2020-08-02

    #Golang

  • 【Golang】类型 - string

    2020-08-02

    #Golang

  • 【Golang】文档

    2020-08-02

    #Golang

  • 【Golang】编译 - 交叉编译(Cross Compilation)

    2020-08-02

    #Golang

  • 【Golang】关键字 - const

    2020-08-02

    #Golang

  • 【Protobuf】Protocol Buffers 性能

    2020-07-31

    #Protobuf

  • 【Protobuf】Protocol Buffers Demo

    2020-07-31

    #Protobuf

  • 【Golang】位运算

    2020-07-31

    #Golang

  • 【Protobuf】Protocol Buffers Convention Guide

    2020-07-29

    #Protobuf

  • 【Protobuf】Protocol Buffers 深入

    2020-07-28

    #Protobuf

  • 【Linux】命令 - nohup 命令

    2020-07-28

    #Linux

  • 【Microservices】服务调用

    2020-07-26

    #Microservices

  • 【Microservices】常见服务注册 / 发现实现框架

    2020-07-26

    #Microservices

  • 【VPN】Terminal 运行 Cisco AnyConnect VPN

    2020-07-26

    #VPN

  • 【Microservices】微服务 - 服务注册(Service Registry)和服务发现(Service Discovery)

    2020-07-26

    #Microservices

  • 【ZooKeeper】学习

    2020-07-25

    #ZooKeeper

  • 【ZooKeeper】安装

    2020-07-25

    #ZooKeeper

  • 【Java】安装

    2020-07-25

    #Java

  • 【Redis】Codis 安装

    2020-07-25

    #Cache System#Redis#Codis

  • 【Golang】Golang 安装

    2020-07-23

    #Golang

  • 【Performance】Prometheus - Exporter - Redis Exporter

    2020-07-23

    #Performancede

  • 【Performance】Prometheus 深入

    2020-07-23

    #Performance

  • 【Linux】安装 oh-my-zsh

    2020-07-23

    #Linux

  • 【Performance】Promethues - Exporter

    2020-07-22

    #Performance

  • 【Performance】Prometheus - Node Exporter

    2020-07-22

    #Performance

  • 【Performance】Prometheus 初入

    2020-07-22

    #Performance

  • 【Performance】Grafana 学习

    2020-07-22

    #Performance

  • 【Software Testing】App 自动化测试框架 - Appium

    2020-07-15

    #Software Testing

  • 【Software Testing】App 自动化测试框架

    2020-07-15

    #Software Testing

  • 【Protobuf】Protocol Buffers 2 中使用 map

    2020-07-12

    #Protobuf

  • 【Cache System】Redis Cluster

    2020-07-10

    #Cache System#Redis

  • 【Cache System】Redis 集群方案

    2020-07-10

    #Cache System#Redis

  • 【Redis】Codis Pipeline

    2020-07-10

    #Cache System#Redis#Codis

  • 【Mattermost】webhook

    2020-07-09

    #Mattermost

  • 【ELK】ELK(Elasticsearch+Logstash+Kibana)学习

    2020-07-07

    #ELK

  • 【Lucene】Lucene 语法

    2020-07-06

    #Lucene

  • 【MySQL】将执行结果输出到文件

    2020-07-06

    #MySQL

  • 【Golang】通过私有库安装依赖

    2020-07-06

    #Golang

  • 【Golang】生成随机数

    2020-07-06

    #Golang

  • 【Git】忽略已经提交的文件

    2020-07-06

    #Git

  • 【Golang】gvm - Golang 版本管理

    2020-07-06

    #Golang

  • 【Golang】代码检查

    2020-07-06

    #Golang

  • 【Golang】幽灵变量(Shadowed Variables)

    2020-07-06

    #Golang

  • 【OpenWrt】OpenWrt 学习

    2020-07-03

    #OpenWrt

  • 【Network】路由(Route)

    2020-06-27

    #Network

  • 【macOS】移除默认输入法

    2020-06-27

    #macOS

  • 【Network】NAT

    2020-06-27

    #Network

  • 【Vmware】安装 VMware EXSI 6.7

    2020-06-27

    #Vmware

  • 【OpenWrt】查看 CPU 温度

    2020-06-21

    #OpenWrt

  • 【Network】tcpdump 抓包

    2020-06-20

    #Network

  • 【Linux】修改 MAC 地址

    2020-06-20

    #Linux

  • 【Linux】查看网络信息

    2020-06-20

    #Linux

  • 【Linux】查看网络接口(Network Interface)

    2020-06-20

    #Linux

  • 【OpenWrt】MacOS 下红米路由器 AC2100 刷 OpenWrt

    2020-06-20

    #OpenWrt

  • 【Golang】Golang 遍历 map 时 key 随机化问题

    2020-06-14

    #Golang

  • 【hexo】使用 node 14 运行 hexo 报错

    2020-06-13

    #hexo

  • 【Linux】Oh-my-zsh 启动慢

    2020-06-13

    #Linux

  • 【Linux】查看当前所有进程

    2020-06-13

    #Linux

  • 【Linux】shell 和 shell 脚本的执行

    2020-06-13

    #Linux

  • 【Linux】Shell 和 Bash

    2020-06-13

    #Linux

  • 【Linux】bash 和 zsh 的启动脚本(.zshrc,.bash_profile,~/.profile 等区别)

    2020-06-13

    #Linux

  • 【Golang】go-redis Redis 连接库学习

    2020-05-24

    #Golang

  • 【Redis】Wireshark 分析 Redis 通讯

    2020-05-24

    #Redis

  • 【Docker】Docker Compose

    2020-05-24

    #Docker

  • 【macOS】brew 使用

    2020-05-24

    #macOS

  • 【Docker】Docker 常用命令

    2020-05-23

    #Docker

  • 【Redis】Codis

    2020-05-12

    #Cache System#Redis#Codis

  • 【Redis】Redis pipeline

    2020-05-09

    #Redis

  • 【Redis】Redis 性能分析 Insight

    2020-05-09

    #Redis

  • 【Redis】Redis 性能测试(redis-benchmark)

    2020-05-09

    #Redis

  • 【Redis】Redis High-availability

    2020-05-07

    #Redis

  • 【Redis】Redis 持久化(Persistence)

    2020-05-07

    #Redis

  • 【Redis】Redis 事务(Transaction)

    2020-05-07

    #Redis

  • 【Redis】Redis Key 长度与性能

    2020-05-07

    #Redis

  • 【Linux】Crontab

    2020-05-05

    #Linux

  • 【WordPress】使用 Docker 创建 WordPress 实例

    2020-05-05

    #WordPress

  • 【AWS】AWS CLI - s3 使用

    2020-05-05

    #AWS

  • 【Compile】交叉编译(Cross compiler)

    2020-05-05

    #Compile

  • 【Linux】Ubuntu 安装 Docker

    2020-05-01

    #Linux

  • 【Linux】shell 变量

    2020-04-26

    #Linux

  • 【Linux】makefile

    2020-04-25

    #Linux

  • 【MySQL】Out of range value for column

    2020-04-25

    #MySQL

  • 【Architecture】连接池(Connection Pool)

    2020-04-21

    #Architecture

  • 【MySQL】Too many connections

    2020-04-21

    #MySQL

  • 【Redis】查看连接信息

    2020-04-21

    #Redis

  • 【Redis】设置密码

    2020-04-21

    #Redis

  • 【Linux】iostat - 查看 IO 实时监控

    2020-04-21

    #Linux

  • 【MySQL】学习

    2020-04-12

    #MySQL

  • 【Architecture】架构学习

    2020-04-11

    #Architecture

  • 【Distributed System】无服务器(Serverless)

    2020-04-11

    #Distributed System

  • 【Network】网络测速工具 - iperf3

    2020-04-11

    #Network

  • 【Golang】JSON 序列化与反序列化

    2020-03-30

    #Golang

  • 【MySQL】用户和权限管理

    2020-03-29

    #MySQL

  • 【MySQL】MySQL 安全性设置

    2020-03-29

    #MySQL

  • 【MySQL】查看 log

    2020-03-29

    #MySQL

  • 【MySQL】Establishing a Database Connection

    2020-03-29

    #MySQL

  • 【Golang】Set 实现

    2020-03-22

    #Golang

  • 【Golang】go-redis 连接 Redis

    2020-03-22

    #Golang

  • 【Netwok】通过反向代理实现内网穿透

    2020-03-22

    #Netwok

  • 【Golang】内置函数

    2020-03-15

    #Golang

  • 【Golang】数据类型

    2020-03-15

    #Golang

  • 【Golang】循环

    2020-03-15

    #Golang

  • 【Golang】异常处理

    2020-03-15

    #Golang

  • 【Golang】静态数组(Array)和切片(slices)

    2020-03-15

    #Golang

  • 【Golang】函数

    2020-03-15

    #Golang

  • 【Golang】模块管理与引用

    2020-03-15

    #Golang

  • 【Golang】变量

    2020-03-15

    #Golang

  • 【Golang】枚举(enumeration)

    2020-03-15

    #Golang

  • 【Golang】变量访问域

    2020-03-15

    #Golang

  • 【Golang】map

    2020-03-15

    #Golang

  • 【Golang】struct

    2020-03-15

    #Golang

  • 【Golang】interface 和 interface {} 类型

    2020-03-15

    #Golang

  • 【Golang】类型转换 - 类型断言(Type Assertion)和强制类型转换

    2020-03-15

    #Golang

  • 【Hardware】ID 卡和 IC 卡

    2020-02-09

    #Hardware

  • 【MySQL】数据类型

    2020-01-31

    #MySQL

  • 【MySQL】MySQL 中的各种数据类型转换

    2020-01-31

    #MySQL

  • 【MySQL】命名习惯

    2020-01-31

    #MySQL

  • 【Golang】Golang 命令

    2020-01-30

    #Golang

  • 【Golang】指针(Pointers)

    2020-01-30

    #Golang

  • 【Golang】类型转换 - 获取变量类型

    2020-01-30

    #Golang

  • 【Linux】CentOS 安装 Docker

    2020-01-30

    #Linux

  • 【Protobuf】Protocol Buffers 入门

    2020-01-29

    #Protobuf

  • 【Golang】上传文件

    2020-01-29

    #Golang

  • 【Raspbeery Pi】树莓派玩耍

    2020-01-29

    #RaspbeeryPi

  • 【Network】电信光猫内网穿透

    2020-01-29

    #Network

  • 【Golang】Golang 使用 UUID

    2020-01-12

    #Golang

  • 【Golang】Golang 的环境变量

    2020-01-12

    #Golang

  • 【Golang】Golang 依赖管理 - go module

    2020-01-12

    #Golang

  • 【Golang】Golang 使用 gRPC

    2020-01-12

    #Golang

  • 【Golang】Golang 连接 MySQL

    2020-01-12

    #Golang

  • 【Golang】修改代码后自动重新编译并启动

    2020-01-12

    #Golang

  • 【Golang】使用 gorm(ORM 框架)

    2020-01-12

    #Golang

  • 【Golang】Web Framework - Gin 使用

    2020-01-12

    #Golang

  • 【Golang】Print

    2020-01-12

    #Golang

  • 【Format】csv

    2020-01-12

    #Format

  • 【Software Testing】Postman 深入

    2019-12-09

    #Software Testing

  • 【Linux】资源使用问题排查

    2019-12-09

    #Linux

  • 【Python】显示对象的所有 Attribute

    2019-12-06

    #Python

  • 【Python】print

    2019-12-01

    #Python

  • 【Python】断言(assert)

    2019-12-01

    #Python

  • 【WordPress】修改站点域名

    2019-12-01

    #WordPress

  • 【Python】常见错误

    2019-11-28

    #Python

  • 【SQL】select for update

    2019-11-26

    #SQL

  • 【Python】Basics - 特殊变量(Special Variables)

    2019-11-26

    #Python

  • 【Python】魔术方法(Magic Methods)

    2019-11-24

    #Python

  • 【Python】import 问题排查

    2019-11-23

    #Python

  • 【Python】pytest - 运行错误

    2019-11-18

    #Python

  • 【Python】 单元测试框架 - pytest

    2019-11-18

    #Python

  • 【Django】Django ORM - 文档整理

    2019-11-17

    #Django

  • 【Django】Django ORM - 性能优化

    2019-11-17

    #Django

  • 【Django】Django ORM - 使 DB Schema 生效

    2019-11-17

    #Django

  • 【Django】使用 Template

    2019-11-17

    #Django

  • 【MySQL】日志记录

    2019-11-17

    #MySQL

  • 【Python】枚举

    2019-11-17

    #Python

  • 【Python】is 和 ==

    2019-11-16

    #Python

  • 【Django】Django 静态资源和 HTML 文件管理

    2019-11-13

    #Django

  • 【Architectural Pattern】前端框架中的 MVC、MVP 和 MVVM

    2019-11-10

    #Architectural Pattern

  • 【Distributed System】分布式 session(Distributed Seesion)

    2019-11-10

    #Distributed System

  • 【hexo】使用 AWS s3 作为 hexo 图库

    2019-11-10

    #hexo

  • 【JQuery】获取对象

    2019-11-10

    #JQuery

  • 【Python】闭包和匿名函数

    2019-11-10

    #Python

  • 【Python】装饰器(Wrapper)

    2019-11-10

    #Python

  • 【Django】Django 路由规则

    2019-11-10

    #Django

  • 【Django】Django 创建 Django 项目或应用

    2019-11-10

    #Django

  • 【Django】template - 插入 Python 代码

    2019-11-10

    #Django

  • 【Django】Django ORM - QuerySet 序列化

    2019-11-10

    #Django

  • 【Django】Django ORM - 查询数据

    2019-11-10

    #Django

  • 【Django】Django ORM - CRUD

    2019-11-10

    #Django

  • 【Django】Django ORM - Define Model

    2019-11-10

    #Django

  • 【macOS】清除 DNS 缓存

    2019-11-06

    #macOS

  • 【Django】错误汇总

    2019-11-05

    #Django

  • 【Python】前缀

    2019-11-04

    #Python

  • 【MySQL】MySQL 错误记录

    2019-11-04

    #MySQL

  • 【Python】Comprehensions

    2019-11-01

    #Python

  • 【Python】Python 一切皆对象

    2019-11-01

    #Python

  • 【Python】I/O - 输入

    2019-11-01

    #Python

  • 【Python】Basics - Built-in Function(内置函数)

    2019-11-01

    #Python

  • 【Python】String

    2019-11-01

    #Python

  • 【Python】Collection - dict

    2019-11-01

    #Python

  • 【Python】Collection - list

    2019-11-01

    #Python

  • 【Python】Python Style Guide

    2019-11-01

    #Python

  • 【JavaEE】Java Servlet 和 JSP(JavaServer Pages)

    2019-11-01

    #Java EE

  • 【Database】聚集索引(Clustered Index)与非聚集索引(Non-clustered Index)

    2019-10-31

    #Database

  • 【Django】通过 ORM 访问 MySQL,插入 Emoji 报错

    2019-10-31

    #Django

  • 【MySQL】MySQL 的存储引擎(Storage Engines)- MyISAM 与 InnoDB

    2019-10-31

    #MySQL

  • 【Django】Django 项目部署到 uWSGI + Nginx 作为生产环境

    2019-10-28

    #Nginx#Django

  • 【HTTP】Web Server(Web 服务器)、Web Application Server(Web 应用服务器)和 CGI(Common Gateway Interface)的故事

    2019-10-28

    #HTTP#Network

  • 【Python】WSGI(Web Server Gateway Interface)、uWSGI Server、uwsgi、WSGI Application 的故事

    2019-10-28

    #Python

  • 【Python】Error Handling

    2019-10-28

    #Python

  • 【Architecture】Design - Error Handling

    2019-10-28

    #Architecture#ArchitectureDesign

  • 【Architecture】Design - Database Schema Design

    2019-10-28

    #Architecture#ArchitectureDesign

  • 【Architecture】Design - API Design

    2019-10-28

    #Architecture#ArchitectureDesign

  • 【Django】Django 使用 Redis

    2019-10-28

    #Django#Redis

  • 【Redis】自动过期

    2019-10-28

    #Redis

  • 【Python】变量作用域

    2019-10-27

    #Python

  • 【Redis】Redis 操作

    2019-10-27

    #Redis

  • 【Redis】安装 Redis

    2019-10-27

    #Redis

  • 【Python】PyCharm 中的 import 问题

    2019-10-27

    #Python

  • 【Python】Basics - 函数返回值

    2019-10-27

    #Python

  • 【Python】Exception

    2019-10-20

    #Python

  • 【Django】Error - Django : Table doesn't exist

    2019-10-20

    #Django

  • 【Python】import

    2019-10-20

    #Python

  • 【Django】Django 读写 Cookie

    2019-10-20

    #Django

  • 【HTTP】Cookie

    2019-10-20

    #HTTP

  • 【Python】Collection - set

    2019-10-20

    #Python

  • 【Python】Basics - 函数参数

    2019-10-20

    #Python

  • 【Django】Django Form

    2019-10-20

    #Django

  • 【SQL】清空表数据后如何让自增 ID 从 1 开始

    2019-10-20

    #MySQL#SQL

  • 【MySQL】ERROR 1701 (42000): Cannot truncate a table referenced in a foreign key

    2019-10-20

    #MySQL

  • 【Django】Django 中的时间获取与相关问题

    2019-10-19

    #Django

  • 【Django】Django Shell

    2019-10-19

    #Django

  • 【Software Testing】Postman 中的 Cookies 设置

    2019-10-19

    #Software Testing

  • 【Nginx】MacOS 下安装 Nginx

    2019-10-19

    #Nginx#macOS

  • 【Node.js】 使用 nvm 管理本地 Node.js 版本

    2019-10-19

    #Node.js#nvm

  • 【Django】处理 PUT 和 DELETE 方法

    2019-10-08

    #Django

  • 【Python】杂 - virtualenv 管理 Python 项目依赖

    2019-10-08

    #Python

  • 【Python】Django - 连接 MySQL

    2019-10-08

    #Django

  • 【Python】杂 - 通过 pyenv 快速切换当前系统 Python 版本

    2019-10-06

    #Python

  • 【Python】杂 - macOS 下设置 Python 默认版本

    2019-10-06

    #Python

  • 【Python】API - 时间表示

    2019-10-06

    #Python

  • 【MySQL】MySQL 8 + macOS 错误:Authentication plugin 'caching_sha2_password' cannot be loaded

    2019-10-06

    #MySQL

  • 【Python】I/O - 异步 I/O

    2019-09-24

    #Python

  • 【Python】线程 - ThreadLocal

    2019-09-24

    #Python

  • 【Python】Basics - 类

    2019-09-23

    #Python

  • 【Python】线程 - 锁

    2019-09-23

    #Python

  • 【Python】线程 - 多线程(Multithreading)

    2019-09-23

    #Python

  • 【Python】线程 - 多进程

    2019-09-23

    #Python

  • 【Linux】命令 - cut 命令

    2019-09-17

    #Linux

  • 【Linux】Shell/Bash - 多命令执行、管道(pipeline)和重定向(redirection)

    2019-09-17

    #Linux

  • 【Linux】命令 - grep 命令

    2019-09-16

    #Linux

  • 【HTTP】RESTful

    2019-08-26

    #HTTP

  • 【HTTP】HTTP 请求方法(Methods)

    2019-08-26

    #HTTP

  • 【SQL】约束(Constraints)

    2019-08-22

    #SQL

  • 【SQL】常用 SQL 语句

    2019-08-22

    #SQL

  • 【Network】IPv4 地址

    2019-08-21

    #Network

  • 【Algorithm】算法思想 - 二分法(Binary Search)

    2019-08-16

    #Algorithm

  • 【Markdown】Markdown 使用中 HTML

    2019-08-15

    #Markdown

  • 【Java】运算符 - 乘法除法问题

    2019-08-14

    #Java

  • 【Java】源码 - BitSet

    2019-08-14

    #Java

  • 【Algorithm】动态规划 - 背包问题

    2019-08-13

    #Algorithm

  • 【Linxu】磁盘管理

    2019-08-08

    #Linxu

  • 【Python】协程(Coroutine)

    2019-08-08

    #Python

  • 【Python】Python 的单线程

    2019-08-06

    #Python

  • 【Python】Python 几种常用的测试框架

    2019-08-06

    #Python

  • 【Architecture】高并发

    2019-08-06

    #Architecture

  • 【Architecture】中台概念

    2019-08-06

    #Architecture

  • 【Algorithm】算法思想 - 分治算法(Divide and Conquer)

    2019-08-05

    #Algorithm

  • 【Algorithm】算法思想 - 贪心算法(Greedy Algorithm)

    2019-08-05

    #Algorithm

  • 【Algorithm】排序算法 - 计数排序(Counting Sort)

    2019-08-05

    #Algorithm

  • 【Architecture】系统架构考虑

    2019-08-05

    #Architecture

  • 【Distributed System】微服务 - Kubernetes 初步

    2019-08-04

    #Microservices

  • 【Distributed System】SOA 与 MicroServices

    2019-08-04

    #Distributed System#Microservices

  • 【Docker】减小 Docker 镜像体积

    2019-08-04

    #Docker

  • 【Performance】 性能指标(Performance Indicator)

    2019-08-04

    #Performance

  • 【Java】集合类 - PriorityQueue 类(优先队列)

    2019-08-02

    #Java

  • 【Linux】命令 - sed 命令

    2019-08-02

    #Linux

  • 【Linux】命令 - lsof 命令

    2019-08-01

    #Linux

  • 【Distributed System】云计算(Cloud Computing)

    2019-08-01

    #Distributed System

  • 【Data Structure】树 - 平衡二叉搜索树 - 有了二叉查找树、AVL 树为啥还需要红黑树?

    2019-08-01

    #Data Structure

  • 【Distributed System】消息队列 - RabbitMQ

    2019-08-01

    #Distributed System

  • 【Microservices】微服务(Microservice Architecture)

    2019-07-31

    #Microservices

  • 【Spring】Spring 框架

    2019-07-31

    #Spring

  • 【Database】读写分离(Read/Write Splitting)

    2019-07-31

    #Database

  • 【Data Structure】优先队列(Priority Queue)

    2019-07-31

    #Data Structure

  • 【Algorithm】排序算法 - 桶排序(Bucket Sort)

    2019-07-30

    #Algorithm

  • 【Algorithm】TopK 问题

    2019-07-30

    #Algorithm

  • 【Java】I/O - 读取数据

    2019-07-30

    #Java

  • 【Algorithm】排序算法 - 堆排序(Heap Sort)

    2019-07-30

    #Algorithm

  • 【Data Structure】堆(Heap)/ 二叉堆(binary heap)

    2019-07-29

    #Data Structure

  • 【Algorithm】算法思想 - 动态规划(Dynamic Programming)

    2019-07-29

    #Algorithm

  • 【Algorithm】递归(Recursion)

    2019-07-29

    #Algorithm

  • 【Algorithm】BigNum 原理

    2019-07-29

    #Algorithm

  • 【Algorithm】算法的时间复杂度(Time complexity)

    2019-07-27

    #Algorithm

  • 【Distributed System】负载均衡(Load balancing)

    2019-07-26

    #Distributed System

  • 【Algorithm】排序算法 - 归并排序(Merge Sort)

    2019-07-25

    #Algorithm

  • 【Netwrok】输入一个 URL 会发生什么

    2019-07-24

    #Netwrok

  • 【LaTeX】支持中文

    2019-07-24

    #LaTeX

  • 【Operating System】进程 - Linux 启动进程的几种方式

    2019-07-18

    #Linux#Operating Systems

  • 【Java】集合类 - LinkedHashMap

    2019-07-16

    #Java

  • 【Operating System】LRU(Least Recently Used)算法

    2019-07-15

    #Algorithm#Operating System

  • 【Network】HTTP 常用响应码

    2019-07-15

    #HTTP#Network

  • 【Database】分库分表

    2019-07-12

    #Database

  • 【Distributed System】柔性事务(Flexible Transactions)

    2019-07-12

    #Distributed System

  • 【Distributed System】一致性哈希(Consistent Hashing)

    2019-07-12

    #Distributed System

  • 【Distributed System】分布式事务(Distributed Transaction)

    2019-07-12

    #Distributed System

  • 【Java】锁 - Lock 接口

    2019-07-12

    #Java

  • 【Java】Java 关键字 - synchronized 关键字中的锁状态

    2019-07-12

    #Java

  • 【Lock】独享锁(Exclusive Lock) VS 共享锁(Shared Lock)

    2019-07-12

    #Java#Lock

  • 【Distributed System】分布式锁(Distributed Lock)

    2019-07-11

    #Distributed System

  • 【Distributed System】分布式系统

    2019-07-11

    #Distributed System

  • 【Operating System】I/O - 零拷贝(Zero-copy)

    2019-07-11

    #Operating System

  • 【Java】JVM - Java 内存模型中的缓存一致性(Cache Coherency)问题

    2019-07-11

    #Java

  • 【Java】Netty 入门

    2019-07-10

    #Java#Network Programming

  • 【Regular Expression】正则表达式(Regular Expression)

    2019-07-10

    #Regular Expression

  • 【Java EE】Jetty 入门

    2019-07-10

    #Java EE

  • 【Operating System】死锁(deadlock)

    2019-07-10

    #Operating System

  • 【Distributed System】消息队列(Message Queue)

    2019-07-10

    #Distributed System

  • 【Distributed System】Dubbo 入门

    2019-07-10

    #Microservices

  • 【Java】值传递与引用传递

    2019-07-10

    #Java

  • 【Linux】统计某文件 / 文件夹个数

    2019-07-10

    #Linux

  • 【Database】数据库连接池

    2019-07-09

    #Database

  • 【Operating System】I/O - 磁盘 I/O 相关概念

    2019-07-09

    #Operating System

  • 【Cache System】缓存穿透(Cache Penetration)、缓存雪崩(Cache Avalanche)与缓存击穿(Cache Breakdown)

    2019-07-08

    #Cache System

  • 【Algorithm】海量数据处理 - 布隆过滤器(Bloom Filter)

    2019-07-05

    #Algorithm

  • 【Algorithm】海量数据处理 - 位图(Bitmap)

    2019-07-05

    #Algorithm

  • 【Algorithm】海量数据处理 - MapReduce

    2019-07-05

    #Algorithm

  • 【Algorithm】海量数据处理 - hash 映射再取模 + hashmap 统计 + 排序

    2019-07-05

    #Algorithm

  • 【Algorithm】海量数据处理

    2019-07-05

    #Algorithm

  • 【Algorithm Problem】海量数据处理 - 10 亿 int 型数,统计只出现一次的数

    2019-07-05

    #Algorithm Problem

  • 【Security】Web 安全

    2019-07-04

    #Security

  • 【OOP】什么是多态

    2019-07-03

    #OOP

  • 【Java】基本数据类型 - 基本数据类型的类型转换

    2019-06-28

    #Java

  • 【Java】基本数据类型 - Java 支持的 8 种基本数据类型

    2019-06-28

    #Java

  • 【Algorithm】计算斐波纳契数(Fibonacci Number)

    2019-06-27

    #Algorithm

  • 【Algorithm】排序算法 - 希尔排序(Shell Sort)

    2019-06-26

    #Algorithm

  • 【Algorithm】排序算法 - 插入排序(Insertion Sort)

    2019-06-25

    #Algorithm

  • 【Algorithm】排序(Sorting)算法

    2019-06-25

    #Algorithm

  • 【Algorithm】排序算法 - 冒泡排序(Bubble Sort)

    2019-06-25

    #Algorithm

  • 【Algorithm】排序算法 - 快速排序(Quick Sort)

    2019-06-25

    #Algorithm

  • 【Interview】应聘者提问

    2019-06-19

    #Interview

  • 【Network】Shadowsocks 总结

    2019-06-19

    #Network

  • 【Data Structure】图(Graph) - 图的物理存储

    2019-06-14

    #Data Structure

  • 【Data Structure】图(Graph) - 图的深度优先搜索(Depth First Search)

    2019-06-14

    #Data Structure

  • 【Data Structure】多叉搜索树 - Trie 树(字典树)

    2019-06-13

    #Data Structure

  • 【Database】数据库索引(Index)

    2019-06-10

    #Database

  • 【Database】数据库索引为什么使用 B+ 树

    2019-06-10

    #Database

  • 【Data Structure】多路平衡查找树 - B+ 树(B+ Tree)

    2019-06-05

    #Data Structure

  • 【Data Structure】多路平衡查找树 - B 树(B-Tree)

    2019-06-04

    #Data Structure

  • 【Data Structure】多路平衡查找树 - 2-3 查找树和 2-4 查找树

    2019-06-04

    #Data Structure

  • 【Algorithm】查找算法

    2019-06-03

    #Algorithm

  • 【Network】Charles 为什么可以获取 HTTPS 包内容

    2019-05-31

    #Network

  • 【Data Structure】哈希表(Hash table)

    2019-05-30

    #Data Structure

  • 【Data Structure】常用数据结构的时间复杂度

    2019-05-30

    #Data Structure

  • 【Data Structure】哈夫曼树(Huffman Tree)

    2019-05-30

    #Data Structure

  • 【Data Structure】平衡二叉搜索树 - 红黑树(Red-Black Tree)

    2019-05-30

    #Data Structure

  • 【Data Structure】平衡二叉搜索树 - AVL 树

    2019-05-30

    #Data Structure

  • 【Data Structure】自平衡二叉搜索树(Self-balancing Binary Search Tree)

    2019-05-29

    #Data Structure

  • 【Data Structure】二叉搜索树(Binary Search Tree)

    2019-05-29

    #Data Structure

  • 【Data Structure】线索二叉树(Threaded Binary Tree)

    2019-05-28

    #Data Structure

  • 【Data Structure】二叉树的遍历(Traversal)

    2019-05-27

    #Data Structure

  • 【Data Structure】二叉树(Binary Tree)

    2019-05-27

    #Data Structure

  • 【Network】OpenWrt 的路由器 ssh 访问

    2019-05-27

    #Network

  • 【Data Structure】广义表

    2019-05-24

    #Data Structure

  • 【Data Structure】矩阵

    2019-05-24

    #Data Structure

  • 【Data Structure】树(Tree)

    2019-05-24

    #Data Structure

  • 【Algorithm】字符串匹配算法 - 朴素的字符串匹配算法(Naive String Matching Algorithm)

    2019-05-23

    #Algorithm

  • 【Algorithm】字符串匹配算法 - KMP 算法

    2019-05-22

    #Algorithm

  • 【Data Structure】串(String)

    2019-05-21

    #Data Structure

  • 【Data Structure】队列(Queue)

    2019-05-21

    #Data Structure

  • 【Data Structure】栈的应用

    2019-05-17

    #Data Structure

  • 【Java】集合类 - Stack

    2019-05-16

    #Java

  • 【Data Structure】栈(Stack)

    2019-05-16

    #Data Structure

  • 【Java】运算符 - 位运算符

    2019-05-16

    #Java

  • 【Data Structure】循环链表(Circular Linked List)

    2019-05-16

    #Data Structure

  • 【Data Structure】双向链表 (Doubly Linked List)

    2019-05-16

    #Data Structure

  • 【Java】集合类 - LinkedList

    2019-05-16

    #Java

  • 【Data Structure】链表 (Linked List)

    2019-05-16

    #Data Structure

  • 【Java】集合类 - ArrayList

    2019-05-15

    #Java

  • 【Data Structure】顺序表

    2019-05-15

    #Data Structure

  • 【Algorithm】什么是算法(Algorithm)

    2019-05-15

    #Algorithm

  • 【Data Structure】什么是数据结构

    2019-05-14

    #Data Structure

  • 【Data Structure】线性表(Linear List)

    2019-05-14

    #Data Structure

  • 【Data Structure】图(Graph)

    2019-05-14

    #Data Structure

  • 【Algorithm Problem】统计文章中每个单词出现的次数

    2019-05-14

    #Algorithm Problem

  • 【Algorithm】排序算法 - 选择排序(Selection Sort)

    2019-05-14

    #Algorithm

  • 【Algorithm】查找算法(Search) - 二分搜索算法 (Binary Search)

    2019-05-13

    #Algorithm

  • 【Security】Wireshake 抓包分析 HTTPS

    2019-05-13

    #Security

  • 【Security】HTTPS

    2019-05-13

    #Security

  • 【Security】安全的 HTTP 的演化

    2019-05-13

    #Security

  • 【Security】密码学基础

    2019-05-13

    #Security

  • 【Network】HTTP 协议的演变

    2019-05-08

    #HTTP#Network

  • 【Network】IP 协议(网际协议)

    2019-05-08

    #Network

  • 【Network】UDP

    2019-05-08

    #Network

  • 【Network】TCP/IP

    2019-05-08

    #Network

  • 【Network】TCP 的拥塞控制(Congestion Handling)

    2019-05-08

    #Network

  • 【Network】TCP 的流量控制(Traffic Control) - 滑动窗口(Sliding Window)

    2019-05-07

    #Network

  • 【Network】TCP 为什么是三次握手,而不是两次或四次?

    2019-05-06

    #Network

  • 【Network】TCP 四次挥手(TCP Four-way Wavehand)

    2019-05-06

    #Network

  • 【Network】Wireshark 抓包学习 TCP 通讯

    2019-05-03

    #Network

  • 【Network】TCP(Transmission Control Protocol)

    2019-05-03

    #Network

  • 【Network】TCP 三次握手(TCP Three-way Handshake)

    2019-05-03

    #Network

  • 【Design Pattern】结构类模式 — 装饰器模式(Decorator Pattern)

    2019-04-09

    #Design Pattern

  • 【Spring】Spring 中的 IoC

    2019-04-08

    #Spring

  • 【Spring】面向切面编程(AOP) 与 Spring

    2019-04-08

    #Spring

  • 【Design Pattern】结构类模式 —- 代理模式(Proxy Pattern)

    2019-04-05

    #Design Pattern

  • 【Java】泛型(Generics)

    2019-04-02

    #Java

  • 【Java】Java 对象的生命周期

    2019-04-02

    #Java

  • 【Java】Java 关键字 - transient 关键字

    2019-04-02

    #Java

  • 【Java】反射(Reflection)

    2019-04-02

    #Java

  • 【Java】instanceof 关键字与 isInstance 方法

    2019-04-01

    #Java

  • 【Java】类的访问修饰符(Access Qualifier)

    2019-04-01

    #Java

  • 【Java】Java 中的引用与如何避免 OutOfMemory

    2019-04-01

    #Java

  • 【Java】内部类(Inner Class)

    2019-04-01

    #Java

  • 【Java】Java 关键字 - static 关键字

    2019-04-01

    #Java

  • 【Java】抽象类(Abstract Class)与接口(Interface)

    2019-04-01

    #Java

  • 【OOP】重写(Overriding)与重载(Overloading)

    2019-04-01

    #OOP

  • 【Java】类(Class)与继承(Inheritance)

    2019-03-29

    #Java

  • 【Java】访问修饰符(Access Modifier)

    2019-03-29

    #Java

  • 【Java】Java 动态代理(Dynamic Proxy)

    2019-03-28

    #Java

  • 【Java】对象的序列化(Serialization)与反序列化(Deserialization)

    2019-03-28

    #Java

  • 【Java】枚举 Enum

    2019-03-27

    #Java

  • 【Java】枚举实现单例模式

    2019-03-26

    #Java

  • 【Java】同步容器与线程安全问题

    2019-03-26

    #Java

  • 【Java】String - String.intern () 方法

    2019-03-26

    #Java

  • 【Java】垃圾回收 - 分代垃圾回收

    2019-03-26

    #Java

  • 【Java】对象的内存分配 - 垃圾回收过程

    2019-03-26

    #Java

  • 【Java】垃圾收集(Garbage Collection)

    2019-03-26

    #Java

  • 【Java】Java 关键字 - final 关键字

    2019-03-19

    #Java

  • 【Java】集合类 - 并发容器 (Concurrent Container)

    2019-03-18

    #Java

  • 【Java】集合类 - CopyOnWriteArrayList

    2019-03-18

    #Java

  • 【Java】hashCode()

    2019-03-18

    #Java

  • 【Java】集合类 - ConcurrentHashMap

    2019-03-18

    #Java

  • 【Java】集合类 - Map

    2019-03-18

    #Java

  • 【Java】集合类 - 遍历 Map 对象的几种方式

    2019-03-18

    #Java

  • 【Java】集合类 - 集合框架

    2019-03-15

    #Java

  • 【Java】集合类 - Set

    2019-03-15

    #Java

  • 【Java】集合类 - List

    2019-03-15

    #Java

  • 【Java】集合类 - Iterable 接口的 Fail-Fast 机制

    2019-03-15

    #Java

  • 【Java】集合类 - HashSet

    2019-03-15

    #Java

  • 【Java】集合类 - Queue

    2019-03-15

    #Java

  • 【Java】集合类 - TreeSet

    2019-03-15

    #Java

  • 【Java】集合类 - HashMap 的并发问题

    2019-03-14

    #Java

  • 【Java】集合类 - HashMap

    2019-03-14

    #Java

  • 【Java】集合类 - Collection 接口的三种遍历方法

    2019-03-14

    #Java

  • 【Java】集合类 - HashSet、HashMap 和 HashTable

    2019-03-13

    #Java

  • 【Java】== 与 equals ()

    2019-03-12

    #Java

  • 【Java】String - String,StringBuilder 和 StringBuffer

    2019-03-11

    #Java

  • 【Java】装箱(Boxing)与拆箱(Unboxing)

    2019-03-11

    #Java

  • 【Java】String - String 类和常量池

    2019-03-11

    #Java

  • 【Java】多线程 - Callable、Future 和 FutureTask

    2019-03-08

    #Java

  • 【Java】JVM - 双亲委派模型(Parents Delegation model)

    2019-03-07

    #Java

  • 【Java】JVM - 自定义类加载器

    2019-03-07

    #Java

  • 【Java】JVM - 对象访问

    2019-03-06

    #Java

  • 【Java】JVM - JVM 内存区域

    2019-03-06

    #Java

  • 【Java】JVM - 类加载机制(ClassLoad Mechanism)

    2019-03-06

    #Java

  • 【Java】JVM - 类加载器(Class Loader)

    2019-03-06

    #Java

  • 【Java】JVM 入门

    2019-03-06

    #Java

  • 【Java】JVM - HotSpot VM

    2019-03-05

    #Java

  • 【Java】JVM - Java 对象头(Header)

    2019-03-04

    #Java

  • 【Java】锁 - JVM 对内部锁的优化

    2019-03-04

    #Java

  • 【Java】I/O - I/O 模型与服务端编程

    2019-03-04

    #Java#Network Programming

  • 【Java】I/O - NIO 使用

    2019-03-04

    #Java

  • 【Java】字符(char)

    2019-03-03

    #Java

  • 【Java】 I/O - I/O 基本操作

    2019-03-03

    #Java

  • 【Java】 字符(串)编码与解码

    2019-03-02

    #Java

  • 【Java】多线程 - 线程间通信工具 CountDownLatch、CyclicBarrier 和 Phaser 类

    2019-03-01

    #Java

  • 【Lock】锁的几种特性

    2019-03-01

    #Java#Lock

  • 【Java】锁 - AQS

    2019-02-28

    #Java

  • 【Java】锁 - ReentrantLock 类

    2019-02-28

    #Java

  • 【Java】多线程 - Java 锁的演化

    2019-02-28

    #Java

  • 【Java】多线程 - Java 保证原子性、有序性、可见性

    2019-02-28

    #Java

  • 【Java】多线程 - 原子类(Atomic Classes)

    2019-02-27

    #Java

  • 【Java】锁 - CAS 无锁算法

    2019-02-27

    #Java

  • 【Java】多线程 - Happens-before 原则

    2019-02-27

    #Java

  • 【Java】多线程 - 线程安全(Thread Safety)

    2019-02-27

    #Java

  • 【Java】多线程 - ThreadLocal

    2019-02-27

    #Java

  • 【Java】多线程 - 守护线程(Daemon Thread)

    2019-02-26

    #Java

  • 【Network】两种高性能 I/O 设计模式(Reactor/Proactor)

    2019-02-26

    #Network#Network Programming

  • 【Java】多线程 - 线程状态切换函数

    2019-02-25

    #Java

  • 【Java】多线程 - 线程池(Thread Pool)

    2019-02-25

    #Java

  • 【Operating System】进程 - 协程(Coroutines)

    2019-02-25

    #Operating System

  • 【Java】JVM - Java 内存模型(Java Memory Model)

    2019-02-25

    #Java

  • 【Lock】锁的可重入性(Reentrancy)

    2019-02-25

    #Lock

  • 【Java】Java 关键字 - volatile 关键字

    2019-02-25

    #Java

  • 【Operating System】文件描述符(File Descriptor)

    2019-02-22

    #Operating System

  • 【Database】两阶段锁(Two-phase locking)

    2019-02-21

    #Database

  • 【Programming】并发编程(Concurrent Programming)

    2019-02-19

    #Programming

  • 【并发控制】乐观并发控制(Optimistic Concurrency Control)与悲观并发控制(Pessimistic Concurrency Control)

    2019-02-17

    #Operating System

  • 【Operating System】进程 - 进程与线程

    2019-02-14

    #Operating System

  • 【Operating System】系统调用

    2019-02-14

    #Operating System

  • 【Operating System】进程 - 进程 / 线程间通信

    2019-02-13

    #Operating System

  • 【Operating System】进程 - 进程 / 线程调度

    2019-02-10

    #Operating Systems

  • 【Linux】iptables 防火墙

    2019-02-02

    #Linux

  • 【Java】多线程 - 线程优先级

    2019-02-01

    #Java

  • 【Java】Java 关键字 - synchronized 关键字

    2019-01-31

    #Java

  • 【Java】多线程 - 线程基础

    2019-01-31

    #Java

  • 【Java】多线程 - Java 中的线程状态及状态切换

    2019-01-31

    #Java

  • 【Linux】SSH 登录与管理

    2019-01-31

    #Linux

  • 【Linux】命令 - scp 命令

    2019-01-30

    #Linux

  • 【Linux】命令 - dig 命令

    2019-01-30

    #Linux

  • 【Network】dnsmasq 初学

    2019-01-30

    #Network

  • 【Linux】定时任务

    2019-01-30

    #Linux

  • 【Network】Shadowsocks + OpenWRT + dnsmasq-full + ipset + gfwList 实现路由器(小米路由器 mini)自动翻墙

    2019-01-30

    #Network

  • 【OpenWrt】小米路由器 mini 刷 OpenWRT

    2019-01-30

    #OpenWrt

  • 【Network】C10K 问题与高性能网络编程入门

    2019-01-20

    #Network#Network Programming

  • 【Linux】Linux 中的 I/O 轮询技术

    2019-01-19

    #Linux#Operating System

  • 【Java】Java 关键字 - finally 关键字

    2019-01-18

    #Java

  • 【Architecture】Nginx 学习

    2019-01-18

    #Architecture#Nginx

  • 【Node.js】Node 的模块定义和使用

    2019-01-17

    #Node.js

  • 【Linux】硬链接与软链接

    2019-01-10

    #Linux

  • 【Distributed System】分布式系统的数据一致性(Data Consistency)

    2019-01-09

    #Distributed System

  • 【Distributed System】分布式事务 - 三阶段提交

    2019-01-09

    #Distributed System

  • 【Distributed System】分布式事务 - 两阶段提交

    2019-01-09

    #Distributed System

  • 【Distributed System】分布式理论 - BASE 理论

    2019-01-08

    #Distributed System

  • 【Distributed System】分布式理论 - CAP 理论

    2019-01-08

    #Distributed System

  • 【OOP】对象的深拷贝(Deep Copy)与浅拷贝(Shallow Copy)

    2019-01-07

    #OOP

  • 【Distributed System】远程过程调用(Remote Procedure Call,RPC)

    2019-01-07

    #Distributed System

  • 【Network】GFW 学习

    2019-01-06

    #Network

  • 【Redis】Redis 入门

    2019-01-06

    #Cache System#Redis

  • 【WordPress】WordPress 安全性设置

    2018-11-12

    #WordPress

  • 【Docker】Docker 的基本使用

    2018-11-12

    #Docker

  • 【Java】macOS 下编译 JDK8

    2018-11-12

    #Java

  • 【Node.js】Node.js 应用性能监测与分析

    2018-11-12

    #Node.js

  • 【Node.js】Node.js 中的单线程模型与多线程 / 进程

    2018-11-12

    #Node.js

  • 【Linux】Shell 脚本

    2018-11-12

    #Linux

  • 【Architectural Pattern】MVVM 与数据绑定

    2018-11-12

    #Architectural Pattern

  • 【Design Pattern】结构类模式 -- 模板方法模式 (Template Method Pattern)

    2018-11-12

    #Design Pattern

  • 【Design Pattern】结构类模式 -- 组合模式 (Composite Pattern)

    2018-11-12

    #Design Pattern

  • 【Design Pattern】结构类模式 -- 适配器模式 (Adapter Pattern)

    2018-11-12

    #Design Pattern

  • 【Design Pattern】结构类模式 -- 享元模式 (Flyweight Pattern)

    2018-11-11

    #Design Pattern

  • 【Design Pattern】行为类模式 -- 观察者模式 (Obsever Pattern)

    2018-11-11

    #Design Pattern

  • 【Design Pattern】行为类模式 -- 策略模式 (Strategy Pattern)

    2018-11-11

    #Design Pattern

  • 【Architectural Pattern】Model – View – Controller (MVC)

    2018-11-11

    #Architectural Pattern

  • 【Java】 Intellij 调试程序断点进入 JDK 源码

    2018-11-11

    #Java

  • 【Java】Java 程序的编译与运行

    2018-11-11

    #Java

  • 【JavaScript】JavaScript 单线程与异步

    2018-11-11

    #JavaScript

  • 【Python】Python 调试技巧

    2018-11-11

    #Python

  • 【iOS】 iOS 内存管理

    2018-11-11

    #iOS

  • 【Design Pattern】行为类模式 -- 备忘者模式(Memento Pattern)

    2018-11-11

    #Design Pattern

  • 【Design Pattern】创建类模式 -- 单例模式 (Singleton Pattern)

    2018-11-11

    #Design Pattern

  • 【Design Pattern】创建类模式 -- 建造者模式 (Builder Pattern)

    2018-11-11

    #Design Pattern

  • 【Design Pattern】创建类模式 -- 工厂模式 (Factory Pattern)

    2018-11-11

    #Design Pattern

  • 【Design Pattern】行为类模式 -- 状态模式 (State Pattern)

    2018-11-11

    #Design Pattern

  • 【Design Pattern】设计模式概念

    2018-11-11

    #Design Pattern

  • 【Markdown】Markdown 中的数学符号与公式

    2018-11-10

    #Markdown

  • 【Linux】命令 - time 命令

    2018-11-06

    #Linux

  • 【Operating System】I/O - 同步、异步与阻塞、非阻塞 I/O 问题

    2018-11-06

    #Operating System

  • 【Node.js】Node.js 的 Event Loop 与异步 I/O

    2018-11-06

    #Node.js

  • 【Linux】chmod/chown - Linux 文件 / 文件夹 权限

    2018-11-05

    #Linux

  • 【SQL】SQLite 命令

    2018-02-24

    #SQL

  • 【SQL】SQL 中几个关键字

    2018-02-24

    #SQL

  • 【WordPress】WordPress 安装插件时提示输入 FTP 账号信息

    2018-02-24

    #WordPress

  • 【WordPress】WordPress 修改管理员用户名名称

    2018-02-24

    #WordPress

  • 【OOP】依赖反转原则(The Dependency Inversion Principle)、控制反转(Inversion of Control)与依赖注入 (Dependency Injection)

    2018-02-24

    #OOP

  • 【MySQL】MySQL 常用命令

    2018-02-23

    #MySQL

  • 【MySQL】Mac 下安装 MySQL

    2018-02-23

    #MySQL

  • 【Java】JavaBean、POJO 和 EJB

    2018-02-23

    #Java

  • 【macOS】 macOS 下查看端口被哪个程序占用

    2018-02-23

    #macOS

  • 【Java】 集合类 - Java 中 List 的基本使用

    2018-02-23

    #Java

  • 【Security】用户验证及密码加密存储

    2018-02-23

    #Security

  • 【OOP】SOLID 原则

    2018-02-23

    #OOP

  • 【Operating System】换行符

    2018-02-23

    #Operating System

  • 【C#】 C# 委托

    2018-02-23

    #C#

  • 【C#】 C# 匿名函数

    2018-02-23

    #C#

  • 【Programming】函数式编程(Functional Programming)

    2018-02-23

    #Programming

  • 【Software Testing】软件测试的种类

    2018-02-23

    #Software Testing

  • 【iOS】通过 Xcode 任意指定 iPhone/iPad 的地理位置

    2017-09-27

    #iOS

  • 【Linux】Linux(CentOS 7)安全策略设置

    2017-09-27

    #Linux

  • 【Linux】命令 - curl 的使用

    2017-09-26

    #Linux

  • 【Linux】查看占用端口的进程

    2017-09-08

    #Linux

  • 【Nginx】Nginx 配置文件的语法检测与路径获取

    2017-09-08

    #Nginx

  • 【Java】javap(Java Class 文件分解工具)

    2017-06-08

    #Java

  • 【Windows】Windows 10 下在 Cmder 中使用 Linux Bash

    2017-06-08

    #Windows

  • 【Java】Java 反编译工具

    2017-06-04

    #Java

  • 【Network】Wireshark 常用过滤命令

    2017-06-04

    #Network

  • 【Network】单播(Unicast)、多播(Multicast)与广播(Broadcast)

    2017-06-04

    #Network

  • 【Network】DHCP 介绍与工作原理

    2017-06-04

    #Network

  • 【Java】Java 开发环境配置及踩的坑

    2017-06-04

    #Java

  • 【iOS】 iOS 不同操作系统兼容问题

    2017-05-15

    #iOS

  • 【Hardware】i386、x86 和 x64 的故事

    2017-04-30

    #Hardware

  • 【iOS】 Apple 移动设备处理器指令集与 Xcode 指令集相关设置

    2017-04-30

    #iOS

  • 【Linux】时间同步问题与 Linux NTP

    2017-04-25

    #Linux

  • 【Linux】CentOS7/RedHat7 NTP 服务无法开机自启动

    2017-04-25

    #Linux

  • 【Linux】查看 Linux 系统版本

    2017-04-24

    #Linux

  • 【VMware】 VMware 中安装 CentOS7

    2017-04-13

    #VMware

  • 【Linux】 Linux 包管理器

    2017-04-13

    #Linux

  • 【VMware】 VMware Workstation 与 Device/Credential Guard 不兼容

    2017-04-13

    #VMware

  • 【JavaScript】 JavaScript 单元测试框架:Jasmine

    2017-04-09

    #JavaScript#Software Testing

  • 【Operating System】环境变量(Environmental Variables)

    2017-04-09

    #Linux

  • 【Node.js】 Node.js 与 NPM 的模块版本管理

    2017-04-09

    #Node.js#npm

  • 【Network】DNS 原理分析

    2017-04-04

    #Network

  • 【C#】Visual Studio 2017 一边 Debug,一边修改代码

    2017-04-03

    #C##Debug#Visual Studio

  • 【Git】 Git 之忽略文件(gitignore)

    2017-04-03

    #Git#Version Control

  • 【Software Testing】 持续集成(Continuous integration)之粗浅理解

    2017-04-02

    #Software Testing

  • 【Data Format】JSON

    2017-04-01

    #JavaScript#Data Format

  • 【JavaScript】 JavaScript 定时器深入解析

    2017-03-31

    #JavaScript

  • 【HTTP】URL 总结

    2017-03-31

    #HTTP

  • 【VMware】 VMware12 中安装 macOS Sierra 10.12.3

    2017-03-13

    #macOS#VMware

  • 【SQL】 SQL 通配符使用

    2017-03-12

    #SQL

  • 【Node.js】 Node.js 与 NPM 入门

    2017-03-11

    #Node.js#NPM

  • 【Browser】 浏览器中的缓存机制

    2017-03-02

    #Frontend#Cache#Browser

  • 【TypeScript】 TypeScript 动态调试方法总结

    2017-03-02

    #Debug#TypeScript

  • My English Blog
  • My OJ Blog
  • 西维蜀黍的健身 Blog